{% load static %}
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>旅游图库 - 旅游推荐系统</title>
    <!-- 引入 Bootstrap 5 -->
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
    <!-- 引入 Font Awesome -->
    <link rel="stylesheet" href="{% static 'plugins/font-awesome-4.7.0/css/font-awesome.css' %}">
    <style>
        :root {
            --primary-color: #ff6b6b;
            --secondary-color: #48dbfb;
            --accent-color: #1dd1a1;
            --dark-color: #2f3640;
        }

        body {
            font-family: 'Microsoft YaHei', sans-serif;
            background-color: #f5f6fa;
        }

        /* 导航条样式保持一致 */
        .navbar-custom {
            background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
            box-shadow: 0 4px 20px rgba(0,0,0,0.1);
            padding: 0;
        }

        .navbar-brand {
            font-weight: 700;
            font-size: 1.8rem;
            color: white !important;
            padding: 15px 25px;
            background-color: rgba(0,0,0,0.2);
            margin-right: 30px;
        }

        .nav-item {
            margin: 0 5px;
        }

        .nav-link-custom {
            color: white !important;
            font-weight: 500;
            padding: 15px 25px !important;
            border-radius: 0;
            transition: all 0.3s;
            position: relative;
            background-color: transparent;
        }

        .nav-link-custom:hover, .nav-link-custom:focus {
            background-color: rgba(255,255,255,0.2);
            transform: translateY(-3px);
            cursor: pointer;
        }

        /* 图库页面特有样式 */
        .gallery-header {
            background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('{% static "img/gallery-banner.jpg" %}');
            background-size: cover;
            background-position: center;
            height: 300px;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            text-align: center;
            margin-bottom: 50px;
        }

        .gallery-title {
            font-size: 3.5rem;
            font-weight: 800;
            text-shadow: 2px 2px 5px rgba(0,0,0,0.5);
        }

        .gallery-subtitle {
            font-size: 1.2rem;
            margin-top: 20px;
        }

         /* 简化后的筛选区域 */
        .filter-section {
            background: white;
            padding: 15px;
            border-radius: 8px;
            box-shadow: 0 3px 10px rgba(0,0,0,0.05);
            margin-bottom: 20px;
        }

        .filter-group {
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
            align-items: center;
        }

        .filter-label {
            font-weight: 600;
            color: var(--dark-color);
            margin-right: 5px;
            white-space: nowrap;
        }

        .filter-select {
            flex: 1;
            min-width: 150px;
            border-radius: 20px;
            padding: 8px 15px;
            border: 1px solid #ddd;
            appearance: none;
            background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
            background-repeat: no-repeat;
            background-position: right 10px center;
            background-size: 15px;
        }

        .filter-btn {
            background-color: var(--primary-color);
            color: white;
            border: none;
            border-radius: 20px;
            padding: 8px 20px;
            transition: all 0.3s;
        }

        .filter-btn:hover {
            background-color: #e74c3c;
            transform: translateY(-2px);
        }

        .gallery-container {
            padding: 30px 0;
        }

        .gallery-item {
            position: relative;
            margin-bottom: 30px;
            border-radius: 10px;
            overflow: hidden;
            box-shadow: 0 5px 15px rgba(0,0,0,0.1);
            transition: all 0.4s;
        }

        .gallery-item:hover {
            transform: translateY(-10px);
            box-shadow: 0 15px 30px rgba(0,0,0,0.2);
        }

        .gallery-img {
            width: 100%;
            height: 250px;
            object-fit: cover;
            transition: transform 0.5s;
        }

        .gallery-item:hover .gallery-img {
            transform: scale(1.05);
        }

        .gallery-overlay {
            position: absolute;
            bottom: 0;
            left: 0;
            right: 0;
            background: linear-gradient(transparent, rgba(0,0,0,0.8));
            color: white;
            padding: 20px;
            opacity: 0;
            transition: opacity 0.3s;
        }

        .gallery-item:hover .gallery-overlay {
            opacity: 1;
        }

        .gallery-location {
            font-weight: 600;
            margin-bottom: 5px;
        }

        .gallery-description {
            font-size: 0.9rem;
        }

        .gallery-stats {
            display: flex;
            justify-content: space-between;
            margin-top: 10px;
            font-size: 0.8rem;
        }

        .gallery-stat {
            display: flex;
            align-items: center;
        }

        .gallery-stat i {
            margin-right: 5px;
        }

        .pagination {
            justify-content: center;
            margin-top: 50px;
        }

        .page-item.active .page-link {
            background-color: var(--primary-color);
            border-color: var(--primary-color);
        }

        .page-link {
            color: var(--primary-color);
        }

        /* 底部快速链接 */
        .quick-links {
            padding: 40px 0;
            background: var(--dark-color);
            color: white;
        }

        .links-title {
            font-size: 1.2rem;
            margin-bottom: 20px;
            position: relative;
            padding-bottom: 10px;
        }

        .links-title:after {
            content: "";
            position: absolute;
            bottom: 0;
            left: 0;
            width: 40px;
            height: 3px;
            background: var(--primary-color);
        }

        .links-list {
            list-style: none;
            padding: 0;
        }

        .links-list li {
            margin-bottom: 10px;
        }

        .links-list a {
            color: #bdc3c7;
            text-decoration: none;
            transition: all 0.3s;
        }

        .links-list a:hover {
            color: white;
            padding-left: 5px;
        }
    </style>
</head>
<body>
    <!-- 导航条 -->
    <nav class="navbar navbar-expand-lg navbar-dark navbar-custom sticky-top">
        <div class="container">
            <a class="navbar-brand" href="#">
                <i class="fa fa-map-marked-alt"></i> 旅游推荐系统
            </a>
            <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav">
                <span class="navbar-toggler-icon"></span>
            </button>
            <div class="collapse navbar-collapse" id="navbarNav">
                <ul class="navbar-nav me-auto">
                    <li class="nav-item">
                        <a class="nav-link nav-link-custom" href="/homepage/"><i class="fa fa-home"></i> 首页</a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link nav-link-custom" href="/travel/article/homepage/"><i class="fa fa-newspaper"></i> 旅游资讯</a>
                    </li>
                    <li class="nav-item dropdown">
                        <a class="nav-link nav-link-custom dropdown-toggle" href="#" id="navbarDropdown1" role="button" data-bs-toggle="dropdown">
                            <i class="fa fa-compass"></i> 目的地推荐
                        </a>
                        <ul class="dropdown-menu" aria-labelledby="navbarDropdown1">
                            <li><a class="dropdown-item" href="#">国内热门</a></li>
                            <li><a class="dropdown-item" href="#">国外精选</a></li>
                            <li><hr class="dropdown-divider"></li>
                            <li><a class="dropdown-item" href="#">季节限定</a></li>
                            <li><a class="dropdown-item" href="#">主题旅游</a></li>
                        </ul>
                    </li>
                    <li class="nav-item dropdown">
                        <a class="nav-link nav-link-custom dropdown-toggle" href="#" id="navbarDropdown2" role="button" data-bs-toggle="dropdown">
                            <i class="fa fa-route"></i> 行程规划
                        </a>
                        <ul class="dropdown-menu" aria-labelledby="navbarDropdown2">
                            <li><a class="dropdown-item" href="#">自由行攻略</a></li>
                            <li><a class="dropdown-item" href="#">跟团游推荐</a></li>
                            <li><a class="dropdown-item" href="#">自驾游路线</a></li>
                        </ul>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link nav-link-custom active" href="/travel/picture/homepage/"><i class="fa fa-camera"></i> 旅游图库</a>
                    </li>
                    <li class="nav-item dropdown">
                        <a class="nav-link nav-link-custom dropdown-toggle" href="#" id="navbarDropdown3" role="button" data-bs-toggle="dropdown">
                            <i class="fa fa-ellipsis-h"></i> 更多
                        </a>
                        <ul class="dropdown-menu" aria-labelledby="navbarDropdown3">
                            <li><a class="dropdown-item" href="#">旅游装备</a></li>
                            <li><a class="dropdown-item" href="#">美食指南</a></li>
                            <li><a class="dropdown-item" href="#">住宿推荐</a></li>
                        </ul>
                    </li>
                </ul>
                <div class="d-flex">
                    <a href="#" class="btn btn-outline-light me-2"><i class="fa fa-user"></i> 登录</a>
                    <a href="#" class="btn btn-light"><i class="fa fa-user-plus"></i> 注册</a>
                </div>
            </div>
        </div>
    </nav>

    <!-- 图库头部 -->
    <div class="gallery-header">
        <div>
            <h1 class="gallery-title">旅游图库</h1>
            <p class="gallery-subtitle">探索世界各地的美景，发现您的下一个旅行目的地</p>
        </div>
    </div>

     <!-- 筛选区域 -->
    <div class="container">
        <div class="filter-section">
            <div class="filter-group">
                <span class="filter-label">地区:</span>
                <select class="filter-select">
                    <option value="">全部地区</option>
                    <option value="north">华北地区</option>
                    <option value="east">华东地区</option>
                    <option value="south">华南地区</option>
                    <option value="central">华中地区</option>
                    <option value="northeast">东北地区</option>
                    <option value="northwest">西北地区</option>
                    <option value="southwest">西南地区</option>
                </select>

                <span class="filter-label">季节:</span>
                <select class="filter-select">
                    <option value="">全部季节</option>
                    <option value="spring">春季</option>
                    <option value="summer">夏季</option>
                    <option value="autumn">秋季</option>
                    <option value="winter">冬季</option>
                </select>

                <span class="filter-label">类型:</span>
                <select class="filter-select">
                    <option value="">全部类型</option>
                    <option value="nature">自然风光</option>
                    <option value="city">城市景观</option>
                    <option value="culture">人文历史</option>
                    <option value="food">美食购物</option>
                </select>

                <button class="filter-btn">筛选 <i class="fa fa-filter"></i></button>
            </div>
        </div>
    </div>

    <!-- 图库内容 -->
    <div class="container gallery-container">
        <div class="row">
            <!-- 图库项目1 -->
            <div class="col-md-4 col-sm-6">
                <div class="gallery-item">
                    <img src="{% static 'img/gallery1.jpg' %}" class="gallery-img" alt="长城">
                    <div class="gallery-overlay">
                        <h5 class="gallery-location">长城，北京</h5>
                        <p class="gallery-description">世界新七大奇迹之一，中国古代伟大的防御工程</p>
                        <div class="gallery-stats">
                            <span class="gallery-stat"><i class="fa fa-eye"></i> 1.2k</span>
                            <span class="gallery-stat"><i class="fa fa-heart"></i> 568</span>
                            <span class="gallery-stat"><i class="fa fa-comment"></i> 89</span>
                        </div>
                    </div>
                </div>
            </div>

            <!-- 图库项目2 -->
            <div class="col-md-4 col-sm-6">
                <div class="gallery-item">
                    <img src="{% static 'img/gallery2.jpg' %}" class="gallery-img" alt="九寨沟">
                    <div class="gallery-overlay">
                        <h5 class="gallery-location">九寨沟，四川</h5>
                        <p class="gallery-description">"童话世界"般的自然景观，色彩斑斓的湖泊和瀑布</p>
                        <div class="gallery-stats">
                            <span class="gallery-stat"><i class="fa fa-eye"></i> 980</span>
                            <span class="gallery-stat"><i class="fa fa-heart"></i> 432</span>
                            <span class="gallery-stat"><i class="fa fa-comment"></i> 76</span>
                        </div>
                    </div>
                </div>
            </div>

            <!-- 图库项目3 -->
            <div class="col-md-4 col-sm-6">
                <div class="gallery-item">
                    <img src="{% static 'img/gallery3.jpg' %}" class="gallery-img" alt="张家界">
                    <div class="gallery-overlay">
                        <h5 class="gallery-location">张家界，湖南</h5>
                        <p class="gallery-description">《阿凡达》取景地，奇峰异石的天然博物馆</p>
                        <div class="gallery-stats">
                            <span class="gallery-stat"><i class="fa fa-eye"></i> 1.1k</span>
                            <span class="gallery-stat"><i class="fa fa-heart"></i> 512</span>
                            <span class="gallery-stat"><i class="fa fa-comment"></i> 82</span>
                        </div>
                    </div>
                </div>
            </div>

            <!-- 图库项目4 -->
            <div class="col-md-4 col-sm-6">
                <div class="gallery-item">
                    <img src="{% static 'img/gallery4.jpg' %}" class="gallery-img" alt="西湖">
                    <div class="gallery-overlay">
                        <h5 class="gallery-location">西湖，杭州</h5>
                        <p class="gallery-description">"人间天堂"的湖光山色，中国十大风景名胜之一</p>
                        <div class="gallery-stats">
                            <span class="gallery-stat"><i class="fa fa-eye"></i> 890</span>
                            <span class="gallery-stat"><i class="fa fa-heart"></i> 398</span>
                            <span class="gallery-stat"><i class="fa fa-comment"></i> 65</span>
                        </div>
                    </div>
                </div>
            </div>

            <!-- 图库项目5 -->
            <div class="col-md-4 col-sm-6">
                <div class="gallery-item">
                    <img src="{% static 'img/gallery5.jpg' %}" class="gallery-img" alt="漓江">
                    <div class="gallery-overlay">
                        <h5 class="gallery-location">漓江，桂林</h5>
                        <p class="gallery-description">"桂林山水甲天下"的代表，如诗如画的自然美景</p>
                        <div class="gallery-stats">
                            <span class="gallery-stat"><i class="fa fa-eye"></i> 1.0k</span>
                            <span class="gallery-stat"><i class="fa fa-heart"></i> 456</span>
                            <span class="gallery-stat"><i class="fa fa-comment"></i> 71</span>
                        </div>
                    </div>
                </div>
            </div>

            <!-- 图库项目6 -->
            <div class="col-md-4 col-sm-6">
                <div class="gallery-item">
                    <img src="{% static 'img/gallery6.jpg' %}" class="gallery-img" alt="黄山">
                    <div class="gallery-overlay">
                        <h5 class="gallery-location">黄山，安徽</h5>
                        <p class="gallery-description">"五岳归来不看山，黄山归来不看岳"的奇松怪石云海</p>
                        <div class="gallery-stats">
                            <span class="gallery-stat"><i class="fa fa-eye"></i> 950</span>
                            <span class="gallery-stat"><i class="fa fa-heart"></i> 421</span>
                            <span class="gallery-stat"><i class="fa fa-comment"></i> 68</span>
                        </div>
                    </div>
                </div>
            </div>

            <!-- 图库项目7 -->
            <div class="col-md-4 col-sm-6">
                <div class="gallery-item">
                    <img src="{% static 'img/gallery7.jpg' %}" class="gallery-img" alt="丽江古城">
                    <div class="gallery-overlay">
                        <h5 class="gallery-location">丽江古城，云南</h5>
                        <p class="gallery-description">纳西文化的活化石，世界文化遗产，慢生活的代表</p>
                        <div class="gallery-stats">
                            <span class="gallery-stat"><i class="fa fa-eye"></i> 1.3k</span>
                            <span class="gallery-stat"><i class="fa fa-heart"></i> 587</span>
                            <span class="gallery-stat"><i class="fa fa-comment"></i> 94</span>
                        </div>
                    </div>
                </div>
            </div>

            <!-- 图库项目8 -->
            <div class="col-md-4 col-sm-6">
                <div class="gallery-item">
                    <img src="{% static 'img/gallery8.jpg' %}" class="gallery-img" alt="三亚海滩">
                    <div class="gallery-overlay">
                        <h5 class="gallery-location">亚龙湾，三亚</h5>
                        <p class="gallery-description">"东方夏威夷"的碧海蓝天，中国最美的海滩之一</p>
                        <div class="gallery-stats">
                            <span class="gallery-stat"><i class="fa fa-eye"></i> 1.1k</span>
                            <span class="gallery-stat"><i class="fa fa-heart"></i> 498</span>
                            <span class="gallery-stat"><i class="fa fa-comment"></i> 83</span>
                        </div>
                    </div>
                </div>
            </div>

            <!-- 图库项目9 -->
            <div class="col-md-4 col-sm-6">
                <div class="gallery-item">
                    <img src="{% static 'img/gallery9.jpg' %}" class="gallery-img" alt="布达拉宫">
                    <div class="gallery-overlay">
                        <h5 class="gallery-location">布达拉宫，拉萨</h5>
                        <p class="gallery-description">世界上海拔最高的宫殿，藏传佛教的圣地</p>
                        <div class="gallery-stats">
                            <span class="gallery-stat"><i class="fa fa-eye"></i> 1.0k</span>
                            <span class="gallery-stat"><i class="fa fa-heart"></i> 467</span>
                            <span class="gallery-stat"><i class="fa fa-comment"></i> 79</span>
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <!-- 分页 -->
        <nav aria-label="Page navigation">
            <ul class="pagination">
                <li class="page-item disabled">
                    <a class="page-link" href="#" aria-label="Previous">
                        <span aria-hidden="true">&laquo;</span>
                    </a>
                </li>
                <li class="page-item active"><a class="page-link" href="#">1</a></li>
                <li class="page-item"><a class="page-link" href="#">2</a></li>
                <li class="page-item"><a class="page-link" href="#">3</a></li>
                <li class="page-item">
                    <a class="page-link" href="#" aria-label="Next">
                        <span aria-hidden="true">&raquo;</span>
                    </a>
                </li>
            </ul>
        </nav>
    </div>

    <!-- 快速链接 -->
    <section class="quick-links">
        <div class="container">
            <div class="row">
                <div class="col-md-3">
                    <h4 class="links-title">热门城市</h4>
                    <ul class="links-list">
                        <li><a href="#">北京</a></li>
                        <li><a href="#">上海</a></li>
                        <li><a href="#">广州</a></li>
                        <li><a href="#">深圳</a></li>
                        <li><a href="#">成都</a></li>
                    </ul>
                </div>
                <div class="col-md-3">
                    <h4 class="links-title">热门景点</h4>
                    <ul class="links-list">
                        <li><a href="#">长城</a></li>
                        <li><a href="#">故宫</a></li>
                        <li><a href="#">西湖</a></li>
                        <li><a href="#">黄山</a></li>
                        <li><a href="#">九寨沟</a></li>
                    </ul>
                </div>
                <div class="col-md-3">
                    <h4 class="links-title">旅游类型</h4>
                    <ul class="links-list">
                        <li><a href="#">自由行</a></li>
                        <li><a href="#">跟团游</a></li>
                        <li><a href="#">自驾游</a></li>
                        <li><a href="#">邮轮游</a></li>
                        <li><a href="#">定制游</a></li>
                    </ul>
                </div>
                <div class="col-md-3">
                    <h4 class="links-title">帮助中心</h4>
                    <ul class="links-list">
                        <li><a href="#">常见问题</a></li>
                        <li><a href="#">预订指南</a></li>
                        <li><a href="#">退改政策</a></li>
                        <li><a href="#">联系我们</a></li>
                        <li><a href="#">意见反馈</a></li>
                    </ul>
                </div>
            </div>
        </div>
    </section>

    <!-- 引入 Bootstrap JS -->
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
    <script>
        // 筛选按钮点击效果
        document.querySelectorAll('.filter-btn').forEach(btn => {
            btn.addEventListener('click', function() {
                // 移除同组其他按钮的active类
                const parentDiv = this.parentElement;
                parentDiv.querySelectorAll('.filter-btn').forEach(item => {
                    item.classList.remove('active');
                });
                // 给当前点击的按钮添加active类
                this.classList.add('active');
            });
        });

        // 图库项目悬浮动画
        document.querySelectorAll('.gallery-item').forEach(item => {
            item.addEventListener('mouseenter', function() {
                this.style.transform = 'translateY(-10px)';
                this.style.boxShadow = '0 15px 30px rgba(0,0,0,0.2)';
            });
            item.addEventListener('mouseleave', function() {
                this.style.transform = '';
                this.style.boxShadow = '0 5px 15px rgba(0,0,0,0.1)';
            });
        });
    </script>
</body>
</html>